Index Property (InfoStore Object)
The Index
property returns the index number for the InfoStore object within the parent
InfoStores collection. Read-only.
Syntax
objInfoStore.Index
Data Type
Long
Remarks
The Index
property indicates this object s position within the parent InfoStores
Collection
Example
Function InfoStoresGetByIndex()
Dim lIndex As Long
Dim objOneInfoStore As Object ' assume valid InfoStore
' set
error handler here
If
objInfoStoreColl Is Nothing Then
MsgBox
"must select an InfoStores collection"
Exit
Function
End If
If 0 = objInfoStoreColl.Count Then
MsgBox "must select collection with 1
or more InfoStores"
Exit
Function
End If
' prompt
user for index; for now, use 1
Set
objOneInfoStore = objInfoStoreColl.Item(1)
MsgBox
"Selected InfoStore 1: " & objOneInfoStore.Name
lIndex =
objOneInfoStore.Index ' save index to
retrieve this later
' ...get
same InfoStore object later
Set
objOneInfoStore = objInfoStoreColl.Item(lIndex)
If
objOneInfoStore Is Nothing Then
MsgBox
"Error, could not reselect the InfoStore"
Else
MsgBox
"Reselected InfoStore " & lIndex & _
" using index: " & objOneInfoStore.Name
End If
Exit
Function
See Also
Item property